package com.gitee.faster.webdav.kernel.protocol.dispatcher;

import com.gitee.faster.webdav.common.constant.MethodEnum;
import com.gitee.faster.webdav.kernel.protocol.HttpExchange;
import lombok.extern.slf4j.Slf4j;
import org.smartboot.http.common.enums.HttpStatus;

/**
 * @author hongda.li
 */
@Slf4j
public class MethodDispatcherNoneMatch implements MethodDispatcher {
    @Override
    public MethodEnum supported() {
        return MethodEnum.UNSUPPORTED;
    }

    @Override
    public void dispatch(HttpExchange httpExchange) {
        httpExchange.setHttpStatus(HttpStatus.FORBIDDEN);
        log.warn("暂不支持的方法 : {}", httpExchange.getMethodEnum().name());
    }
}
